package com.zhanglu.fun.services.website.forum.post;

import com.zhanglu.fun.services.website.bean.request.ForumPostRequest;
import com.zhanglu.fun.services.website.client.DataCenterClient;
import com.zhanglu.fun.services.website.common.ResultResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhanglu
 * @description
 * @date 2017/9/24 15:04
 */
@Service
@Slf4j
public class PostService {
    @Autowired
    private DataCenterClient dataCenterClient;

    public ResultResponse getForumPostsByThreadId(Long threadId) {
        return dataCenterClient.getForumPostsByThreadId(threadId);
    }

    public ResultResponse addForumPost(ForumPostRequest post) {
        return dataCenterClient.addForumPost(post);
    }
}
